<script>
import { useAppStore } from "./store/app";
import { useLocaleStore } from "@/store/locale";
export default {
  globalData: {
    safeAreaInsetsBottom: uni.getSystemInfoSync()?.safeAreaInsets?.bottom || 0,
  },
  onLaunch: function () {
    let langType = uni.getLocale();
    const store = useLocaleStore();
    const { applicationLocale, SetAppLocale } = store;
    if (applicationLocale) {
      SetAppLocale(applicationLocale);
      this.$i18n.locale = applicationLocale;
    } else if (langType) {
      if (langType == "zh") {
        langType = "zh-Hans";
      }
      SetAppLocale(langType);
      this.$i18n.locale = langType;
    } else {
      SetAppLocale("en");
    }
    const appStore = useAppStore();
    if (appStore.isLogin) {
      appStore.refreshUserInfo();
    }
  },
  onShow: function () {
    getApp().globalData.safeAreaInsetsBottom =
      uni.getSystemInfoSync()?.safeAreaInsets?.bottom || 0;
  },
  onHide: function () {},
  methods: {},
};
</script>
<style lang="scss">
page {
  font-family: Alibaba PuHuiTi 3;
  font-variation-settings: "opsz" auto;
  font-feature-settings: "kern" on;
  background: #08121e;
  color: #ffffff;
}

:deep(.u-modal__button-group__wrapper--hover) {
  background-color: #132034 !important;
  /* 可根据需求修改颜色值，这里设置为橙色 */
}

// :deep(.u-popup__content) {
//   max-width: 84vw !important;
// }
</style>
